﻿<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/Default.Master" Buffer="true" CodeBehind="Catalogo_Produtos.aspx.cs" Inherits="SisEagle.View.Web.Pedidos.Catalogo_Produtos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="../UserControl/UcCategorias.ascx" tagname="UcCategorias" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"> </script>
    <script src="../Scripts/jquery.toastmessage.js" type="text/javascript"> </script>
    <script src="../Scripts/Notificacao.js" type="text/javascript"> </script>
    <link href="../Style/main/resources/css/jquery.toastmessage.css" rel="stylesheet" type="text/css" />
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="conteudo_interno">
        <div class="titulos_modulosCadastro">
            Pesquisa Produtos
        </div>
        
        <table class="ui-accordion">
            <tr>
                <td class="formEnvio_popupErro" style="width: 288px">
                    Código Carrinho:
                    <asp:Label ID="lblCodCarrinhoCompras" runat="server" style="font-weight: 700"></asp:Label>
                </td>
                <td style="width: 272px">
                    &nbsp;</td>
                <td>
                        &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="formEnvio_popupErro" style="width: 288px">
                    Categoria:
                    <uc1:UcCategorias ID="UcCategorias" runat="server" />
                </td>
                <td style="width: 272px">
                    Nome Produto:
                    <asp:TextBox ID="txtNomeProduto" runat="server"></asp:TextBox>
                </td>
                <td>
                        &nbsp;<asp:ImageButton ID="btnBuscar" runat="server" 
                            ImageUrl="~/imagens/sistema/botoes/btn_buscar.png" onclick="btnBuscar_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="btnLimpar" runat="server" 
                            ImageUrl="~/imagens/sistema/botoes/btn_limpar.png" 
                        onclick="btnLimpar_Click" />
                   </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="4">
                    <asp:Panel ID="pnProdutos" runat="server" Visible="False">
                        <asp:GridView ID="gridProdutos" runat="server" Width="98%" 
                        BackColor="AliceBlue" AutoGenerateColumns="False" PageSize="2" AllowSorting="True"
                        BorderWidth="2px" CellPadding="2" CellSpacing="2" BorderColor="Silver" Font-Size="13px"
                        HeaderStyle-BackColor="BurlyWood" PagerSettings-Mode="NextPreviousFirstLast"
                        AlternatingRowStyle-BackColor="Silver" HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                        HeaderStyle-Width="170px" PagerSettings-Position="Bottom" PagerSettings-NextPageImageUrl="~/App_Themes/Default/imagens/grid/proxima_pagina.png"
                        PagerSettings-FirstPageImageUrl="~/App_Themes/Default/imagens/grid/primeira_pagina.png"
                        PagerSettings-LastPageImageUrl="~/App_Themes/Default/imagens/grid/ultima_pagina.png"
                        
                        
                        
                             
                            
                            PagerSettings-PreviousPageImageUrl="~/App_Themes/Default/imagens/grid/pagina_anterior.png" 
                            onrowdatabound="gridProdutos_RowDataBound">
                            <AlternatingRowStyle BackColor="Silver"></AlternatingRowStyle>
                            <Columns>
                                <asp:TemplateField>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Image ID="imgProduto" runat="server" Width="80px" />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>                                    
                                <asp:TemplateField HeaderText="Codigo">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCodProduto" runat="server" Text='<%# Bind("CodProduto") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("CodProduto") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <HeaderStyle Width="5%" />
                                    <ItemStyle Width="50px" />
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="Nome" DataField="NomeProduto" 
                                ItemStyle-Width= "100px" >
                                <HeaderStyle Width="70%" />
                                <ItemStyle Width="100px" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="Categoria" DataField="NomeCategoria" 
                                ItemStyle-Width= "100px" >
                                <ItemStyle Width="100px" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="Valor Unitario" DataField="Valor_Venda" 
                                ItemStyle-Width= "100px" >
                                <ItemStyle Width="100px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Qtd Estoque">
                                    <ItemTemplate>
                                        <asp:Label ID="lblQtdEstoque" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                    <HeaderStyle Width="5%" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Selecionar">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgSelecionar" runat="server" 
                                            ImageUrl="~/imagens/sistema/add_conciliacao.png" />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                    <HeaderStyle Width="10%" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle BackColor="BurlyWood" HorizontalAlign="Center" Width="170px" />
                            <PagerSettings FirstPageImageUrl="~/App_Themes/Default/imagens/grid/primeira_pagina.png" 
                            LastPageImageUrl="~/App_Themes/Default/imagens/grid/ultima_pagina.png" 
                            Mode="NextPreviousFirstLast" 
                            NextPageImageUrl="~/App_Themes/Default/imagens/grid/proxima_pagina.png" 
                            
                            PreviousPageImageUrl="~/App_Themes/Default/imagens/grid/pagina_anterior.png" />
                        </asp:GridView>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td class="formEnvio_popupErro" style="width: 288px">
                    &nbsp;</td>
                <td style="width: 272px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        
    </div>
</asp:Content>